import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

// 2. 引入组件样式
import 'vant/lib/index.css';
//图标库
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'
import { FontAwesomeIcon }from '@fortawesome/vue-fontawesome'
library.add(fas, far, fab)

//创建vue实例 
const app = createApp(App)//以App组件为默认页面
//pinia状态管理以插件的形式 安装到vue实例上
app.use(createPinia())
//将路由以插件的形式安装到vue实例上  this.$router跳转 this.$route获取路由信息
app.use(router)

//全局注册组件
app.component('font-awesome-icon', FontAwesomeIcon)

//将vue实例挂载到index.html中 id=app的元素上 
app.mount('#app')
